package maven.jyhs.com.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class User {



    private Integer id ;
    @NotBlank(message = "姓名不能为空")
    private String name ;

    @Length(min = 11, max = 11, message = "手机号码必须为11位数字")
    private String phone;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")

    private Date registration ;
    @Length( max = 8, message = "金额不能超过8位")
    private String balance ;

    private  String avatar ;
    @NotBlank(message = "卡号不能为空")
    private  String cardnumber ;

    @Setter
    @Getter
    private List<Menu> child;
}
